﻿/*
 * 资源收集
 * 
 * 
 */

namespace SG
{
    public class ResourceCollector
    {
        public bool _isNoDestory;
        public string _path;
        public UnityEngine.Object _object;
        //public List<AssetOperationHandle> _handles = new List<AssetOperationHandle>();

        /// <summary>
        /// 资源定位地址
        /// </summary>
        public string Location { set; get; }

        /// <summary>
        /// 资源常驻不销毁
        /// </summary>
        public bool DontDestroy { set; get; }

        /// <summary>
        /// 主handle
        /// </summary>
        //public AssetOperationHandle MainHandle {
        //    get 
        //    {
        //        return _handles[0];
        //    }
        //}
        /// <summary>
        /// 是否加载完毕
        /// </summary>
        //public bool IsDone
        //{
        //    get
        //    {
        //        return MainHandle.IsDone;
        //    }
        //}
        /// <summary>
		/// 销毁对象池
		/// </summary>
		public void Destroy()
        {
            // 卸载资源对象
            //foreach (var handle in _handles)
            //{
            //    handle.Release();
            //}
            // 销毁克隆对象
            //if (_object != null)
            // GameObject.Destroy(_object);
        }
    }
}
